package com.chinasofti.demo;

import com.chinasofti.domain.User;
import com.chinasofti.service.UserService;
import com.chinasofti.service.impl.UserServiceImpl;
import java.sql.Date;
import java.util.ArrayList;
import java.util.List;

public class TestDemo {

    public static void main(String[] args) {
        UserService userService = new UserServiceImpl();

        User u1 = new User();
        u1.setLoginname("dali");
        u1.setPassword("123456");
        u1.setUsername("赵六");
        u1.setGender("男");
        u1.setBirthday(new Date(2022,11,11));
        u1.setDutydate(new Date(2022,11,11));
        User u2 = new User();
        u2.setLoginname("aqiang");
        u2.setPassword("123456");
        u2.setBirthday(new Date(2021,12,12));
        u2.setDutydate(new Date(2021,12,12));

        List<User> list = new ArrayList<>();
        list.add(u1);
        list.add(u2);
        userService.batchAdd(list);
    }
}